#ifndef HANDSHAKESUCCEEDCMD_H
#define HANDSHAKESUCCEEDCMD_H

#include "Command/BaseCmd.h"
#include "Protocol/CloudProtocol.h"

class HandshakeSucceedCmd : public BaseCmd
{
    Q_OBJECT

public:
    enum{FunctionCode = CloudProtocol::HandshakeSucceed};

    Q_INVOKABLE explicit HandshakeSucceedCmd(QObject *parent = 0);

    Package toPackage();
    void unPackage(Package package);

    QByteArray serverRandom() const;
    void setServerRandom(const QByteArray &serverRandom);

    quint32 heartbeatIntervalTime() const;
    void setHeartbeatIntervalTime(const quint32 &heartbeatIntervalTime);

    quint8 heartbeatTimeoutCount() const;
    void setHeartbeatTimeoutCount(const quint8 &heartbeatTimeoutCount);

    quint32 heartbeatTimeoutTime() const;
    void setHeartbeatTimeoutTime(const quint32 &heartbeatTimeoutTime);

    QByteArray serverTime() const;
    void setServerTime(const QByteArray &serverTime);

private:
    QByteArray m_serverRandom;
    quint32 m_heartbeatIntervalTime;
    quint8  m_heartbeatTimeoutCount;
    quint32 m_heartbeatTimeoutTime;
    QByteArray m_serverTime;
};

#endif // HANDSHAKESUCCEEDCMD_H
